<template>
    <div class="list-component">
		<el-form class="search-bar" :inline="true" :model="searchObj" ref="searchObj">
			<el-form-item label="巡查日期"  prop="daterange">
				<el-date-picker
					v-model="searchObj.daterange"
					type="daterange"
					format="yyyy.MM.dd"
					value-format="yyyy-MM-dd"
					align="right"
					unlink-panels
					clearable
					start-placeholder="开始日期"
					end-placeholder="结束日期"
					range-separator="至"
				></el-date-picker>
			</el-form-item>
			 <el-form-item class="button-bar">
				<el-button type="primary" size="small" @click="getListData(1)">查询</el-button>
			</el-form-item>
		</el-form>
        <div class="list">
            <div class="data">
                <el-table :data="listData.data" ref="listData" stripe v-height="'auto'" >
                    <el-table-column type="index" label="序号" prop="index" align="center" width="60px" >
                        <div slot-scope="scope">
                            {{(listData.pageNum - 1) * listData.pageSize + 1 + scope.$index }}
                        </div>
                    </el-table-column>
					<el-table-column label="开始桩号" prop="startMark"></el-table-column>
					<el-table-column label="结束桩号" prop="endMark"></el-table-column>
					<!-- <el-table-column label="巡查方向" prop="checkDirection"></el-table-column> -->
					<!-- <el-table-column label="防护设施缺损(处)" prop="protection"></el-table-column>
					<el-table-column label="隔离栅损坏(处)" prop="separation"></el-table-column>
					<el-table-column label="标志缺损(处)" prop="sign"></el-table-column>
					<el-table-column label="绿化管护不善(m)" prop="virescence"></el-table-column> -->
                    <el-table-column label="巡查人" prop="checkUser" ></el-table-column>
					<el-table-column label="负责人" prop="responsible" ></el-table-column>
                    <el-table-column label="巡查日期" prop="checkDateStr" ></el-table-column>
					<el-table-column label="状态" prop="statusName" ></el-table-column>
                    <el-table-column label="操作" prop="status" align="center">
                        <slot slot-scope="scope">
                            <el-button size="mini" @click="viewDetail(scope)">查看</el-button>
                        </slot>
                    </el-table-column>
                </el-table>
            </div>
            <el-pagination layout="prev, pager, next"
                :current-page="listData.pageNum"
                :page-size="listData.pageSize"
                :total="listData.total"
                @current-change="getListData"
                @prev-click="getListData"
                @next-click="getListData"
            ></el-pagination>
        </div>
        <el-dialog title="详情" :visible.sync="showDialog">
			<detail :id="rowId" @refresh="getListData"></detail>
		</el-dialog>
    </div>
</template>
<script>
	import detail from "./yanxiansheshi-detail.vue"
	import listMixin from "../list.mixin.js"
export default {
	components:{detail},
	mixins:[listMixin],
    data(){
        return{
    		apiMethod:"infrastructure_yanxiansheshiList"
        }
    }
}
</script>

